﻿using WindowsForms.AOnline.View.Dictionary;
//using System.Threading.Tasks;

namespace WindowsForms.AOnline.Presenter.Dictionary.Department
{
    public class DepartmentsPresenter : Presenter<IDepartmentsView> 
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CurrenciesPresenter" /> class.
        /// </summary>
        /// <param name="view">The view.</param>
        public DepartmentsPresenter(IDepartmentsView view) 
            : base(view)
        {
        }

        /// <summary>
        /// Displays this instance.
        /// </summary>
        public void Display(int page)
        {
            View.Departments = Model.GetDepartments(page);
        }

        public int GetPageSize()
        {
            return Model.GetPageSizeDepartments();
        }

        /// <summary>
        /// Displays the active.
        /// </summary>
        public void GetAll()
        {
            View.Departments = Model.GetAllDepartments();
        }

        /// <summary>
        /// Displays for combo tree.
        /// </summary>
        /// <param name="accountId">The account identifier.</param>
        public void DisplayForComboTree(int accountId)
        {
            View.Departments = Model.GetAllDepartments();
        }
    }
}
